/* toString( ) cu supraincacare */
public class ToStringWith {
int x, y;
/** Constructor */
public ToStringWith(int anX, int aY) {
x = anX; y = aY;
}
/** toString */
public String toString( ) {
return "ToStringWith[" + x + "," + y + "]";
}
/** main reaza si afisaza un obiect */
public static void main(String[] args) {
System.out.println(new ToStringWith(42, 86));
}
}

